﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdEdBaseUserIO : OdEdUserIO
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdEdBaseUserIO(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdEdBaseUserIO_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdEdBaseUserIO obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdEdBaseUserIO()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdEdBaseUserIO(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new static OdEdBaseUserIO cast(OdRxObject pObj)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = GlobalsPINVOKE.OdEdBaseUserIO_cast(OdRxObject.getCPtr(pObj));
			OdEdBaseUserIO result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdEdBaseUserIO)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdEdBaseUserIO)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdEdBaseUserIO)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdRxClass desc()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdEdBaseUserIO_desc(), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxClass isA()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdEdBaseUserIO_isA(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxObject queryX(OdRxClass protocolClass)
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.OdEdBaseUserIO_queryX(this.swigCPtr, OdRxClass.getCPtr(protocolClass)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdEdBaseUserIO createObject()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = GlobalsPINVOKE.OdEdBaseUserIO_createObject();
			OdEdBaseUserIO result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdEdBaseUserIO)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdEdBaseUserIO)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdEdBaseUserIO)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGePoint3d getLASTPOINT()
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdEdBaseUserIO_getLASTPOINT(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setLASTPOINT(OdGePoint3d pt)
		{
			GlobalsPINVOKE.OdEdBaseUserIO_setLASTPOINT(this.swigCPtr, OdGePoint3d.getCPtr(pt));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdEdPointDefTracker createRubberBand(OdGePoint3d arg0, OdGsModel pModel)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = GlobalsPINVOKE.OdEdBaseUserIO_createRubberBand__SWIG_0(this.swigCPtr, OdGePoint3d.getCPtr(arg0), OdGsModel.getCPtr(pModel));
			OdEdPointDefTracker result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdEdPointDefTracker)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdEdPointDefTracker)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdEdPointDefTracker)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdEdPointDefTracker createRubberBand(OdGePoint3d arg0)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = GlobalsPINVOKE.OdEdBaseUserIO_createRubberBand__SWIG_1(this.swigCPtr, OdGePoint3d.getCPtr(arg0));
			OdEdPointDefTracker result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdEdPointDefTracker)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdEdPointDefTracker)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdEdPointDefTracker)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdEdPointDefTracker createRectFrame(OdGePoint3d arg0, OdGsModel pModel)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = GlobalsPINVOKE.OdEdBaseUserIO_createRectFrame__SWIG_0(this.swigCPtr, OdGePoint3d.getCPtr(arg0), OdGsModel.getCPtr(pModel));
			OdEdPointDefTracker result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdEdPointDefTracker)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdEdPointDefTracker)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdEdPointDefTracker)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdEdPointDefTracker createRectFrame(OdGePoint3d arg0)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = GlobalsPINVOKE.OdEdBaseUserIO_createRectFrame__SWIG_1(this.swigCPtr, OdGePoint3d.getCPtr(arg0));
			OdEdPointDefTracker result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdEdPointDefTracker)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdEdPointDefTracker)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdEdPointDefTracker)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGePoint3d getPoint(string prompt, int options, OdGePoint3d pDefaultValue, string keywords, OdEdPointTracker pTracker)
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdEdBaseUserIO_getPoint__SWIG_0(this.swigCPtr, prompt, options, OdGePoint3d.getCPtr(pDefaultValue), keywords, OdEdPointTracker.getCPtr(pTracker)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGePoint3d getPoint(string prompt, int options, OdGePoint3d pDefaultValue, string keywords)
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdEdBaseUserIO_getPoint__SWIG_1(this.swigCPtr, prompt, options, OdGePoint3d.getCPtr(pDefaultValue), keywords), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGePoint3d getPoint(string prompt, int options, OdGePoint3d pDefaultValue)
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdEdBaseUserIO_getPoint__SWIG_2(this.swigCPtr, prompt, options, OdGePoint3d.getCPtr(pDefaultValue)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGePoint3d getPoint(string prompt, int options)
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdEdBaseUserIO_getPoint__SWIG_3(this.swigCPtr, prompt, options), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual OdGePoint3d getPoint(string prompt)
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdEdBaseUserIO_getPoint__SWIG_4(this.swigCPtr, prompt), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double getAngle(string prompt, int options, double defaultValue, string keywords, OdEdRealTracker pTracker)
		{
			double result = GlobalsPINVOKE.OdEdBaseUserIO_getAngle__SWIG_0(this.swigCPtr, prompt, options, defaultValue, keywords, OdEdRealTracker.getCPtr(pTracker));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double getAngle(string prompt, int options, double defaultValue, string keywords)
		{
			double result = GlobalsPINVOKE.OdEdBaseUserIO_getAngle__SWIG_1(this.swigCPtr, prompt, options, defaultValue, keywords);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double getAngle(string prompt, int options, double defaultValue)
		{
			double result = GlobalsPINVOKE.OdEdBaseUserIO_getAngle__SWIG_2(this.swigCPtr, prompt, options, defaultValue);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double getAngle(string prompt, int options)
		{
			double result = GlobalsPINVOKE.OdEdBaseUserIO_getAngle__SWIG_3(this.swigCPtr, prompt, options);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double getAngle(string prompt)
		{
			double result = GlobalsPINVOKE.OdEdBaseUserIO_getAngle__SWIG_4(this.swigCPtr, prompt);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double getDist(string prompt, int options, double defaultValue, string keywords, OdEdRealTracker pTracker)
		{
			double result = GlobalsPINVOKE.OdEdBaseUserIO_getDist__SWIG_0(this.swigCPtr, prompt, options, defaultValue, keywords, OdEdRealTracker.getCPtr(pTracker));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double getDist(string prompt, int options, double defaultValue, string keywords)
		{
			double result = GlobalsPINVOKE.OdEdBaseUserIO_getDist__SWIG_1(this.swigCPtr, prompt, options, defaultValue, keywords);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double getDist(string prompt, int options, double defaultValue)
		{
			double result = GlobalsPINVOKE.OdEdBaseUserIO_getDist__SWIG_2(this.swigCPtr, prompt, options, defaultValue);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double getDist(string prompt, int options)
		{
			double result = GlobalsPINVOKE.OdEdBaseUserIO_getDist__SWIG_3(this.swigCPtr, prompt, options);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual double getDist(string prompt)
		{
			double result = GlobalsPINVOKE.OdEdBaseUserIO_getDist__SWIG_4(this.swigCPtr, prompt);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
